<?php
require_once(dirname(__FILE__) . '/include/config.inc.php');

echo "123";

$dosql->Execute("SELECT a.*,p.content FROM  `fa_cms_archives`  as a left join `fa_cms_addonproduct` as p on p.id=a.id  WHERE a.`model_id`=3   ORDER BY a.id asc", 8);
while ($row3 = $dosql->GetArray(8)) {

    $id = $row3['id'];
    echo $id."<br>";
    $content = $row3['content'];

    if ($content) {
        //过滤图片文件
        $pic_arr = array();
        preg_match_all("/src=[\"|'|\s]{0,}(\/([^>]*)\.(gif|jpg|png|bmp))/isU", $content, $pic_arr);
        if(count($pic_arr)>0) {
            $pic_arr = array_unique($pic_arr[1]);
            $images = implode(',', $pic_arr);
            $dosql->Execute("update  `fa_cms_addonproduct`  set  c where id='$id' ");
            echo $id . "更新成功" . "<br>";
        }
    }
}


?>